package com.sz.designpattern.simplefactory;

public class Factory {

    public static IProduct createProdcut(String arg){
        IProduct product = null;
        if ("a".equalsIgnoreCase(arg)){
            product = new ProductA();
        }else {
            product = new ProductB();
        }
        return product;
    }
}
